package com.app.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.app.biz.AppCategoryBiz;
import com.app.dao.AppCategoryDao;
import com.app.entity.AppCategory;
import com.app.entity.AppInfo;
@Service("appCategoryBiz")
public class AppCategoryBizImpl implements AppCategoryBiz{
	@Autowired
	private AppCategoryDao appCategoryDao;
	
	 @Transactional(readOnly=true)//不启用事务覆盖类的注解..
	public List<AppCategory> getAppCategoryByParendId(int parendId) {
		// TODO Auto-generated method stub
		return appCategoryDao.getAppCategoryByParendId(parendId);
	}

	 public static void main(String[] args) {
			ApplicationContext context=new ClassPathXmlApplicationContext("beans.xml");
			AppCategoryBiz movieBiz=(AppCategoryBiz) context.getBean("appCategoryBiz");
			
//			List<AppCategory> list1=movieBiz.getAppCategoryByParendId(1);
		
	
//			for(int i=0;i<list1.size();i++){
//			System.out.println(list1.get(i).getCategoryName());
//			}
		
     }




}
